<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
    function test(num1,num2) {
        console.log(num1 + num2);
    }

    test(1, 3);
    test(1);
    test(1, 3,5);

    function getSum() {
        console.log(arguments instanceof Array);
        console.log(typeof arguments);
        console.log(arguments);
    }

    getSum(1);

        function coding() {
            if (arguments.length == 1) {
                console.log(arguments[0] + "我了个去");
            } else {
                var str = "";
                for (var i = 0; i < arguments.length; i++) {
                    str += arguments[i] + ",";
                }
                console.log(str + "hehe");
            }

        }
    coding();


        function show(arg) {
            if (arg instanceof String || typeof arg == "string") {
                console.log(arg);
            } else if (arg instanceof Number || typeof arg == "number") {
                console.log("这是一个数字" + arg);
            }

        }

    show(1);
        show("小黑")
    </script>
</head>
<body>

</body>
</html>